<?php
/*
// +----------------------------------------------------------------------------------------
// | Icoterie Development Framework Intelligence Enterprise Management Priority Selective
// +----------------------------------------------------------------------------------------
// | Copyright (c) [2019] [Honor Full Epoch Educational Science Technology Hebei Co., Ltd.]
// | website  http://dev.icoterie.top http://www.ihfe.top
// +----------------------------------------------------------------------------------------
// | [Icoterie Development Framework] is licensed under the Mulan PSL v2.
// +----------------------------------------------------------------------------------------
// | You can use this software according to the terms and conditions of the Mulan PSL v2.
// +----------------------------------------------------------------------------------------
// | Licensed ( http://license.coscl.org.cn/MulanPSL2 )
// +----------------------------------------------------------------------------------------
// | THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
// | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
// | FIT FOR A PARTICULAR PURPOSE.
// +----------------------------------------------------------------------------------------
// | See the Mulan PSL v2 for more details.
// +----------------------------------------------------------------------------------------
// | Author: Reflux Lewse,Red Shadow Sue
// +----------------------------------------------------------------------------------------
*/
namespace core\basic;
class Config
{
	//获取配置参数
	public static function get($file,$name = 'all')
    {
		if (is_file(CONFIG_PATH . $file . '.php')) {
            $filename = CONFIG_PATH . $file . '.php';//载入配置文件
			$configs = require $filename;
		}
		if (! is_array($configs)) return;
		if($name == 'all'){
			return $configs;
		}else if(isset($configs[$name])){
			return $configs[$name];
		}
    }
}
